package com.starlink.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.starlink.common.PageQueryRequest;
import com.starlink.model.vo.mall.AdminIntegratonArticlesVO;
import org.springframework.data.domain.Pageable;
import com.starlink.model.domain.MallIntegrationDO;
import com.starlink.model.request.MallIntegrationRequest;
import com.starlink.model.vo.MallIntegrationVO;

import java.util.List;

/**
 * @author zhanghong
 */
public interface MallIntegrationService extends IService<MallIntegrationDO> {

    /**
     * 根据主键查询
     * @param id
     * @return
     */
    MallIntegrationVO getByKey(long id);
    /**
     * 分页查询，手动分页
     * @param request
     * @return
     */
    PageInfo<MallIntegrationVO> pageQuery(Pageable pageable,MallIntegrationRequest request);
    /**
     * 列表查询
     * @param request
     * @return
     */
    List<MallIntegrationVO> listQuery(MallIntegrationRequest request);
    /**
     * 新增
     * @param request
     * @return
     */
    Boolean add(MallIntegrationRequest request);
    /**
     * 根据主键更新
     * @param request
     * @return
     */
    Boolean updateByKey(MallIntegrationRequest request);
    /**
     * 根据主键删除
     * @param id
     * @return
     */
    Boolean deleteDOByIds(String id);

    PageInfo<List<MallIntegrationVO>> pageList(Pageable pageable, MallIntegrationRequest request);

    /**
     * 查询可关联商品信息
     * @param pageable
     * @param request
     * @return
     */
    PageInfo<AdminIntegratonArticlesVO> pageQueryArticles(Pageable pageable, PageQueryRequest request);
}